﻿using UnityEngine;
using UnityEngine.EventSystems;
using Yoozoo.Mars.Got;
using Yoozoo.Gameplay.RTS;
using Yoozoo.Gameplay.RTS.Proto;
using System;
using UnityEngine.Serialization;

public class SandboxObjectMono : MonoBehaviour 
{
    public int objectType;
    public string uniqueId;
    public int gridIndex;

    public void Init(int gridIndex, int objectType, string uniqueId)
    {
        this.gridIndex = gridIndex;
        this.objectType = objectType;
        this.uniqueId = uniqueId;
   
        // 这里尝试绑定列车的碰撞体
        MarchMono mono = gameObject.GetComponent<MarchMono>();
        if (mono) mono.SetColliderTrainName();
    }
}
